package Package.Test1;

import java.util.ArrayList;
import java.util.List;

public class Test1 {
    public static final void Test1() {
        List<Student> student = new ArrayList<Student>();
        Student S1 = new Student("ZhangsAan", 16, "man");
        Student S2 = new Student("LISi", 16, "man");
        Student S3 = new Student("WangWu", 16, "man");
        Student S4 = new Student("ZhaoLiu", 16, "man");
        student.add(S1);
        student.add(S2);
        student.add(S3);
        student.add(S4);
        System.out.println(student);
        for (int i=0;i<student.size();i++){
            Student students=student.get(i);
            System.out.println(students.getName());
            System.out.println(students.getIs());
            System.out.println(students.getSex());
        }
    }

}


